
<!DOCTYPE HTML>
<html lang="en" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>关于smart-http · smartboot 中文指南</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.2">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"buttons":[{"user":"smartboot","repo":"smart-socket","type":"star","size":"small","count":true}]};
    </script>

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    关于smartboot
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    smart-socket 使用手册
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../smart-socket/">
            
                <a href="../smart-socket/">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" >
            
                <span>
            
                    
                    第一章 smart-socket开发指南
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.2.1" data-path="../smart-socket/chapter-1/2.1-基础应用/">
            
                <a href="../smart-socket/chapter-1/2.1-基础应用/">
            
                    
                    1.1 快速上手
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.2" data-path="../smart-socket/chapter-1/2.2-Spring集成/">
            
                <a href="../smart-socket/chapter-1/2.2-Spring集成/">
            
                    
                    1.2 Spring集成smart-socket
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.3" data-path="../smart-socket/chapter-1/SUMMARY.html">
            
                <a href="../smart-socket/chapter-1/SUMMARY.html">
            
                    
                    小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../smart-socket/chapter-2/">
            
                <a href="../smart-socket/chapter-2/">
            
                    
                    第二章 源码解析
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.3.1" data-path="../smart-socket/chapter-2/核心接口/">
            
                <a href="../smart-socket/chapter-2/核心接口/">
            
                    
                    2.1 核心接口与状态机
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.2" data-path="../smart-socket/chapter-2/服务端/">
            
                <a href="../smart-socket/chapter-2/服务端/">
            
                    
                    2.2 服务端
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.3" data-path="../smart-socket/chapter-2/客户端/">
            
                <a href="../smart-socket/chapter-2/客户端/">
            
                    
                    2.3 客户端
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.4" data-path="../smart-socket/chapter-2/AioSession/">
            
                <a href="../smart-socket/chapter-2/AioSession/">
            
                    
                    2.4 会话AioSession
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.5" data-path="../smart-socket/chapter-2/SUMMARY.html">
            
                <a href="../smart-socket/chapter-2/SUMMARY.html">
            
                    
                    2.5 小结
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../smart-socket/chapter-3/">
            
                <a href="../smart-socket/chapter-3/">
            
                    
                    第三章 通信协议
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.4.1" data-path="../smart-socket/chapter-3/1-消息归类/">
            
                <a href="../smart-socket/chapter-3/1-消息归类/">
            
                    
                    3.1 消息归类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4.2" data-path="../smart-socket/BLANK.html">
            
                <a href="../smart-socket/BLANK.html">
            
                    
                    3.2 半包/粘包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4.3" data-path="../smart-socket/BLANK.html">
            
                <a href="../smart-socket/BLANK.html">
            
                    
                    3.3 Http消息解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4.4" data-path="../smart-socket/BLANK.html">
            
                <a href="../smart-socket/BLANK.html">
            
                    
                    3.4 RPC消息解析
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../smart-socket/chapter-5/">
            
                <a href="../smart-socket/chapter-5/">
            
                    
                    第四章 内存池
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="../smart-socket/chapter-6/">
            
                <a href="../smart-socket/chapter-6/">
            
                    
                    第五章 未来规划
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="../smart-socket/end/">
            
                <a href="../smart-socket/end/">
            
                    
                    附录
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" >
            
                <span>
            
                    
                    smart-http 实战手册
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.3.1" data-path="./">
            
                <a href="./">
            
                    
                    关于smart-http
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" >
            
                <span>
            
                    
                    第一章 smart-http开发指南
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.2.1" data-path="chapter-1/">
            
                <a href="chapter-1/">
            
                    
                    1.1 快速上手
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.2" data-path="chapter-1/http_route.html">
            
                <a href="chapter-1/http_route.html">
            
                    
                    1.2 请求路由
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.3" data-path="chapter-1/file_upload.html">
            
                <a href="chapter-1/file_upload.html">
            
                    
                    1.3 文件上传/下载
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.4" data-path="chapter-1/websocket.html">
            
                <a href="chapter-1/websocket.html">
            
                    
                    1.4 WebSocket
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" >
            
                <span>
            
                    
                    技术分享
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../share/rpc/smart-socket-rpc.html">
            
                <a href="../share/rpc/smart-socket-rpc.html">
            
                    
                    smart-socket实现RPC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../share/firstfit/readme.html">
            
                <a href="../share/firstfit/readme.html">
            
                    
                    内存管理-首次适应算法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../share/thread/readme.html">
            
                <a href="../share/thread/readme.html">
            
                    
                    Thread知多少
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../donation.html">
            
                <a href="../donation.html">
            
                    
                    关于捐赠
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >关于smart-http</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <p><strong>&#x5173;&#x4E8E;smart-http</strong></p>
<p>smart-http &#x662F;&#x4E00;&#x6B3E;&#x91C7;&#x7528; Java &#x8BED;&#x8A00;&#x7F16;&#x5199;&#x7684; Http &#x670D;&#x52A1;&#x5668;&#xFF0C;&#x6709;&#x522B;&#x4E8E;&#x4E1A;&#x754C;&#x77E5;&#x540D;&#x7684; Web&#x5BB9;&#x5668;&#xFF1A;Tomcat&#x3001;Undertow&#xFF0C;smart-http &#x5E76;&#x4E0D;&#x652F;&#x6301; Servlet &#x89C4;&#x8303;&#xFF0C;&#x4F46;&#x5BF9;&#x4E8E;&#x5904;&#x7406; Http &#x8BF7;&#x6C42;&#x6240;&#x9700;&#x7684;&#x5404;&#x9879;&#x80FD;&#x529B;&#xFF0C;&#x5B83;&#x90FD;&#x5177;&#x5907;&#x3002;</p>
<p>smart-http &#x5929;&#x751F;&#x5C31;&#x662F;&#x5F02;&#x6B65;&#x975E;&#x963B;&#x585E;&#x7684; I/O &#x6A21;&#x578B;&#xFF0C;&#x56E0;&#x4E3A;&#x5176;&#x901A;&#x4FE1;&#x5185;&#x6838;&#x91C7;&#x7528;&#x4E86; smart-socket&#x3002;&#x6240;&#x4EE5;&#x65E0;&#x8BBA;&#x662F;&#x6027;&#x80FD;&#x8FD8;&#x662F;&#x7A33;&#x5B9A;&#x6027;&#xFF0C;&#x90FD;&#x662F;&#x975E;&#x5E38;&#x51FA;&#x8272;&#x7684;&#x3002;
&#x5728; 4&#x6838; 2.9GHz &#x7684;&#x7535;&#x8111;&#x4E0B;&#x538B;&#x6D4B;&#x7684; QPS &#x53EF;&#x8FBE; 73W&#xFF0C;&#x6D41;&#x91CF;&#x4F20;&#x8F93;&#x6548;&#x7387;&#x6BCF;&#x79D2;&#x7A81;&#x7834;&#x767E;&#x5146;&#x3002;</p>
<p>smart-http &#x7684;&#x8BDE;&#x751F;&#x6E90;&#x4E8E; smart-socket &#x7684;&quot;&#x91CE;&#x5FC3;&quot;&#xFF0C;&#x4E00;&#x76F4;&#x4EE5;&#x6765; smart-socket &#x90FD;&#x662F;&#x4EE5;&#x4E1A;&#x754C;&#x4F18;&#x79C0;&#x7684;&#x901A;&#x4FE1;&#x6846;&#x67B6;&#x4E3A;&#x76EE;&#x6807;&#x5728;&#x4E0D;&#x65AD;&#x7684;&#x63D0;&#x5347;&#x81EA;&#x5DF1;&#x3002;
&#x5E76;&#x4E14;&#x6709;&#x5E78;&#x63A5;&#x89E6;&#x5230; <a href="https://www.techempower.com/benchmarks/#section=data-r18&amp;hw=ph&amp;test=fortune" target="_blank">TechEmpower</a>&#xFF0C;&#x4E00;&#x4E2A;&#x6807;&#x51C6;&#x6027;&#x80FD;&#x6D4B;&#x8BD5;&#x5E73;&#x53F0;&#x3002;
&#x7531;&#x4E8E;&#x53C2;&#x4E0E;&#x6027;&#x80FD;&#x8BC4;&#x6D4B;&#x9700;&#x8981;&#x4F7F;&#x7528; Http &#x534F;&#x8BAE;&#xFF0C;&#x800C;&#x5F7C;&#x65F6; smart-socket &#x53EA;&#x5B8C;&#x6210;&#x57FA;&#x672C;&#x901A;&#x4FE1;&#x529F;&#x80FD;&#xFF0C;&#x5E76;&#x672A;&#x63D0;&#x4F9B;&#x4E1A;&#x754C;&#x4E3B;&#x6D41;&#x534F;&#x8BAE;&#x7684;&#x9002;&#x914D;&#x3002;
&#x4E3A;&#x4E86;&#x80FD;&#x591F;&#x6709;&#x4E2A;&#x6E05;&#x6670;&#x7684;&#x81EA;&#x6211;&#x4E86;&#x89E3;&#xFF0C;&#x624D;&#x5F00;&#x542F; smart-http &#x7684;&#x6F2B;&#x6F2B;&#x7814;&#x53D1;&#x8DEF;&#x3002;</p>
<p>&#x4E2A;&#x4EBA;&#x5F88;&#x6B23;&#x8D4F;&#x4E00;&#x53E5;&#x8BDD;&#xFF1A;&#x4E00;&#x4E2A;&#x4EBA;&#x53EF;&#x4EE5;&#x8D70;&#x7684;&#x5F88;&#x5FEB;&#xFF0C;&#x4F46;&#x4E00;&#x7FA4;&#x4EBA;&#x53EF;&#x4EE5;&#x8D70;&#x7684;&#x5F88;&#x8FDC;&#x3002;
&#x5C06; smart-http &#x5F00;&#x6E90;&#x51FA;&#x6765;&#xFF0C;&#x662F;&#x671F;&#x671B;&#x8FD9;&#x4E2A;&#x9879;&#x76EE;&#x80FD;&#x5E2E;&#x5230;&#x4E00;&#x4E9B;&#x4EBA;&#xFF0C;&#x540C;&#x65F6;&#x5438;&#x6536;&#x5927;&#x5BB6;&#x5BF9;&#x5B83;&#x63D0;&#x51FA;&#x7684;&#x53D1;&#x5C55;&#x5EFA;&#x8BAE;&#xFF0C;&#x8BA9; smart-http &#x548C;&#x4E2D;&#x610F;&#x5B83;&#x7684;&#x7528;&#x6237;&#x53EF;&#x4EE5;&#x5171;&#x540C;&#x8FDB;&#x6B65;&#x3002;
&#x5BF9;&#x4E8E;&#x6280;&#x672F;&#xFF0C;&#x6211;&#x4EEC;&#x4E00;&#x76F4;&#x662F;&#x656C;&#x754F;&#x7684;&#xFF1B;&#x800C;&#x5BF9;&#x4E8E;&#x5B66;&#x4E60;&#xFF0C;&#x8981;&#x65F6;&#x523B;&#x4FDD;&#x6301;&#x8C26;&#x5351;&#x3002;&#x8FD8;&#x662F;&#x90A3;&#x53E5;&#x8BDD;&#xFF1A;&#x5F00;&#x6E90;&#x4E0D;&#x6613;&#xFF0C;&#x524D;&#x884C;&#x4E14;&#x73CD;&#x60DC;&#x3002; </p>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; smartboot.org 2018 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2020-04-01 22:27:20
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"关于smart-http","level":"1.3.1","depth":2,"next":{"title":"第一章 smart-http开发指南","level":"1.3.2","depth":2,"ref":"","articles":[{"title":"1.1 快速上手","level":"1.3.2.1","depth":3,"path":"smart-http/chapter-1/README.md","ref":"smart-http/chapter-1/README.md","articles":[]},{"title":"1.2 请求路由","level":"1.3.2.2","depth":3,"path":"smart-http/chapter-1/http_route.md","ref":"smart-http/chapter-1/http_route.md","articles":[]},{"title":"1.3 文件上传/下载","level":"1.3.2.3","depth":3,"path":"smart-http/chapter-1/file_upload.md","ref":"smart-http/chapter-1/file_upload.md","articles":[]},{"title":"1.4 WebSocket","level":"1.3.2.4","depth":3,"path":"smart-http/chapter-1/websocket.md","ref":"smart-http/chapter-1/websocket.md","articles":[]}]},"previous":{"title":"smart-http 实战手册","level":"1.3","depth":1,"ref":"","articles":[{"title":"关于smart-http","level":"1.3.1","depth":2,"path":"smart-http/README.md","ref":"smart-http/README.md","articles":[]},{"title":"第一章 smart-http开发指南","level":"1.3.2","depth":2,"ref":"","articles":[{"title":"1.1 快速上手","level":"1.3.2.1","depth":3,"path":"smart-http/chapter-1/README.md","ref":"smart-http/chapter-1/README.md","articles":[]},{"title":"1.2 请求路由","level":"1.3.2.2","depth":3,"path":"smart-http/chapter-1/http_route.md","ref":"smart-http/chapter-1/http_route.md","articles":[]},{"title":"1.3 文件上传/下载","level":"1.3.2.3","depth":3,"path":"smart-http/chapter-1/file_upload.md","ref":"smart-http/chapter-1/file_upload.md","articles":[]},{"title":"1.4 WebSocket","level":"1.3.2.4","depth":3,"path":"smart-http/chapter-1/websocket.md","ref":"smart-http/chapter-1/websocket.md","articles":[]}]}]},"dir":"ltr"},"config":{"plugins":["-lunr","-search","-sharing","search-plus","expandable-chapters-interactive","tbfed-pagefooter","github","github-buttons","edit-link"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy smartboot.org 2018","modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"github":{"url":"https://github.com/smartboot/smart-socket"},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"expandable-chapters-interactive":{},"github-buttons":{"buttons":[{"user":"smartboot","repo":"smart-socket","type":"star","size":"small","count":true}]},"edit-link":{"label":"Edit This Page","base":"https://gitee.com/smartboot/book/edit/master"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"search-plus":{}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"smartboot 中文指南","language":"en","gitbook":"*","description":"本文涵盖了smartboot下所有项目的技术手册"},"file":{"path":"smart-http/README.md","mtime":"2020-04-01T14:27:20.457Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2020-04-02T05:22:17.739Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-expandable-chapters-interactive/expandable-chapters.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

